package com.midian.action.mc.sys;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.midian.action.mc.common.AjaxAction;
import com.midian.common.annotation.FunctionAnnotationOverride;
import com.midian.model.sys.SysConf;
import com.midian.service.sys.ISysConfService;

/**
 * 系统配置Action
 * @author Mengfh
 *
 */
@Scope("prototype")
@Controller("sysConfAction")
@FunctionAnnotationOverride(isAction = true, auth = "系统配置管理")
public class SysConfAction extends AjaxAction<SysConf> {
	/**系统配置实体*/
	private SysConf entity;
	/**系统配置实体列表*/
	private List<SysConf> rows;
	/**系统配置业务*/
	private ISysConfService sysConfService;
	
	public SysConf getEntity() {
		return entity;
	}
	public void setEntity(SysConf entity) {
		this.entity = entity;
	}
	@Resource(name = "sysConfService")
	public void setSysConfService(ISysConfService sysConfService) {
		this.service = sysConfService;
		this.sysConfService = sysConfService;
	}
	@Override
	protected SysConf dytEntity() {
		if(this.entity == null) {
			this.entity = new SysConf();
		}
		return getEntity();
	}
	@Override
	protected void dyEntity(SysConf t) {
		setEntity(t);
	}
	@Override
	public void setRows(List<SysConf> rows) {
		this.rows = rows;
	}
	@Override
	public List<SysConf> getRows() {
		return rows;
	}
}
